package com.zzptc.sky.exam_wangjiawei;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        SharedPreferences sharedPreferences=Myutil.getsha();
        Boolean b=sharedPreferences.getBoolean("fla",false);
        if (b){
            new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(1000);
                    Intent intent=new Intent(MainActivity.this,Main2Activity.class);
                    startActivity(intent);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();

        }else{
            Intent intent1=new Intent(MainActivity.this,Main4Activity.class);
            startActivity(intent1);
        }
    }
}
